﻿using System;
using System.IO;
using System.Text;
using System.Security.Cryptography;
using TConvert = System.Convert;
using System.Collections;
using System.Text.RegularExpressions;

namespace DBA.Common
{
    public class MD5:DEncryptBase
    {
        public override string Encode(string encryptString)
        {
            byte[] b = Encoding.Default.GetBytes(encryptString);
            b = new MD5CryptoServiceProvider().ComputeHash(b);
            string ret = "";
            for (int i = 0; i < b.Length; i++)
                ret += b[i].ToString("x").PadLeft(2, '0');
            return ret;
        }

        public override string Decode(string decryptString)
        {
            throw new NotImplementedException();
        }
    }
}
